{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "orig_nbformat": 4,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.7.1 64-bit ('Python3_7_2')"
  },
  "interpreter": {
   "hash": "ceed3ede7d2ae4746b1bde0ed48f83d28ba93d0b68e140a25bb2fbb7cbabeb22"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "x1 = tf.constant([[1,2,3],[4,5,6]])\n",
    "x2 = tf.constant([[11,22,33],[44,55,66]])\n",
    " "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "TensorShape([2, 3])"
      ]
     },
     "metadata": {},
     "execution_count": 4
    }
   ],
   "source": [
    "x1.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3), dtype=int32, numpy=\n",
       "array([[[ 1,  2,  3],\n",
       "        [ 4,  5,  6]],\n",
       "\n",
       "       [[11, 22, 33],\n",
       "        [44, 55, 66]]])>"
      ]
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "source": [
    "a0 = tf.stack([x1,x2],axis=0)\n",
    "a0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3), dtype=int32, numpy=\n",
       "array([[[ 1,  2,  3],\n",
       "        [11, 22, 33]],\n",
       "\n",
       "       [[ 4,  5,  6],\n",
       "        [44, 55, 66]]])>"
      ]
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "source": [
    "a1 = tf.stack([x1,x2],axis=1)\n",
    "a1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 3, 4), dtype=float32, numpy=\n",
       "array([[[ 5.,  9.,  8.,  8.],\n",
       "        [ 5.,  5.,  3.,  5.],\n",
       "        [ 1., 11.,  5.,  9.]],\n",
       "\n",
       "       [[ 8., 11.,  6.,  9.],\n",
       "        [ 2.,  5.,  3.,  3.],\n",
       "        [ 8.,  7.,  1.,  6.]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 7
    }
   ],
   "source": [
    "x1 = tf.random.poisson([2,3,4],5)\n",
    "x1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 3, 4), dtype=float32, numpy=\n",
       "array([[[-0.6237459 ,  0.6306237 , -0.4636105 ,  1.0227368 ],\n",
       "        [-0.58773357,  1.437229  , -0.64327043,  0.04034583],\n",
       "        [ 0.9691194 ,  0.471588  ,  0.17693284, -1.736604  ]],\n",
       "\n",
       "       [[ 0.2871367 , -0.19786608, -0.83648056,  0.15666842],\n",
       "        [ 0.7509649 ,  0.12859385, -0.07996013, -2.2880611 ],\n",
       "        [ 1.0483027 ,  0.89730126,  0.04551175,  0.8807739 ]]],\n",
       "      dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 8
    }
   ],
   "source": [
    "y1 = tf.random.normal([2,3,4])\n",
    "y1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3, 4), dtype=float32, numpy=\n",
       "array([[[[ 5.        ,  9.        ,  8.        ,  8.        ],\n",
       "         [ 5.        ,  5.        ,  3.        ,  5.        ],\n",
       "         [ 1.        , 11.        ,  5.        ,  9.        ]],\n",
       "\n",
       "        [[ 8.        , 11.        ,  6.        ,  9.        ],\n",
       "         [ 2.        ,  5.        ,  3.        ,  3.        ],\n",
       "         [ 8.        ,  7.        ,  1.        ,  6.        ]]],\n",
       "\n",
       "\n",
       "       [[[-0.6237459 ,  0.6306237 , -0.4636105 ,  1.0227368 ],\n",
       "         [-0.58773357,  1.437229  , -0.64327043,  0.04034583],\n",
       "         [ 0.9691194 ,  0.471588  ,  0.17693284, -1.736604  ]],\n",
       "\n",
       "        [[ 0.2871367 , -0.19786608, -0.83648056,  0.15666842],\n",
       "         [ 0.7509649 ,  0.12859385, -0.07996013, -2.2880611 ],\n",
       "         [ 1.0483027 ,  0.89730126,  0.04551175,  0.8807739 ]]]],\n",
       "      dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 9
    }
   ],
   "source": [
    "a0 = tf.stack([x1,y1],axis=0)\n",
    "a0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3, 4), dtype=float32, numpy=\n",
       "array([[[[ 5.        ,  9.        ,  8.        ,  8.        ],\n",
       "         [ 5.        ,  5.        ,  3.        ,  5.        ],\n",
       "         [ 1.        , 11.        ,  5.        ,  9.        ]],\n",
       "\n",
       "        [[-0.6237459 ,  0.6306237 , -0.4636105 ,  1.0227368 ],\n",
       "         [-0.58773357,  1.437229  , -0.64327043,  0.04034583],\n",
       "         [ 0.9691194 ,  0.471588  ,  0.17693284, -1.736604  ]]],\n",
       "\n",
       "\n",
       "       [[[ 8.        , 11.        ,  6.        ,  9.        ],\n",
       "         [ 2.        ,  5.        ,  3.        ,  3.        ],\n",
       "         [ 8.        ,  7.        ,  1.        ,  6.        ]],\n",
       "\n",
       "        [[ 0.2871367 , -0.19786608, -0.83648056,  0.15666842],\n",
       "         [ 0.7509649 ,  0.12859385, -0.07996013, -2.2880611 ],\n",
       "         [ 1.0483027 ,  0.89730126,  0.04551175,  0.8807739 ]]]],\n",
       "      dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 10
    }
   ],
   "source": [
    "a1 = tf.stack([x1,y1],axis=1)\n",
    "a1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3), dtype=float32, numpy=\n",
       "array([[[-0.9661166 , -0.04117008, -0.67174935],\n",
       "        [ 0.6423652 ,  0.44960386, -0.8188423 ]],\n",
       "\n",
       "       [[-1.4387952 , -0.12139827, -1.4256965 ],\n",
       "        [ 0.2289934 , -0.4847298 , -0.86219543]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 9
    }
   ],
   "source": [
    "#多维\n",
    "x = tf.random.normal([2,2,3])\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "metadata": {},
     "execution_count": 14
    }
   ],
   "source": [
    "x.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 3), dtype=float32, numpy=\n",
       "array([[[7., 6., 6.],\n",
       "        [4., 8., 4.]],\n",
       "\n",
       "       [[6., 9., 4.],\n",
       "        [7., 6., 5.]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 10
    }
   ],
   "source": [
    "y = tf.random.poisson([2,2,3],5)\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(4, 2, 3), dtype=float32, numpy=\n",
       "array([[[-0.9661166 , -0.04117008, -0.67174935],\n",
       "        [ 0.6423652 ,  0.44960386, -0.8188423 ]],\n",
       "\n",
       "       [[-1.4387952 , -0.12139827, -1.4256965 ],\n",
       "        [ 0.2289934 , -0.4847298 , -0.86219543]],\n",
       "\n",
       "       [[ 7.        ,  6.        ,  6.        ],\n",
       "        [ 4.        ,  8.        ,  4.        ]],\n",
       "\n",
       "       [[ 6.        ,  9.        ,  4.        ],\n",
       "        [ 7.        ,  6.        ,  5.        ]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 11
    }
   ],
   "source": [
    "a = tf.concat([x,y],axis=0)\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "metadata": {},
     "execution_count": 18
    }
   ],
   "source": [
    "a.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 2, 6), dtype=float32, numpy=\n",
       "array([[[-0.9661166 , -0.04117008, -0.67174935,  7.        ,\n",
       "          6.        ,  6.        ],\n",
       "        [ 0.6423652 ,  0.44960386, -0.8188423 ,  4.        ,\n",
       "          8.        ,  4.        ]],\n",
       "\n",
       "       [[-1.4387952 , -0.12139827, -1.4256965 ,  6.        ,\n",
       "          9.        ,  4.        ],\n",
       "        [ 0.2289934 , -0.4847298 , -0.86219543,  7.        ,\n",
       "          6.        ,  5.        ]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 12
    }
   ],
   "source": [
    "b = tf.concat([x,y],axis=-1)\n",
    "b "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 4, 3), dtype=float32, numpy=\n",
       "array([[[-0.9661166 , -0.04117008, -0.67174935],\n",
       "        [ 0.6423652 ,  0.44960386, -0.8188423 ],\n",
       "        [ 7.        ,  6.        ,  6.        ],\n",
       "        [ 4.        ,  8.        ,  4.        ]],\n",
       "\n",
       "       [[-1.4387952 , -0.12139827, -1.4256965 ],\n",
       "        [ 0.2289934 , -0.4847298 , -0.86219543],\n",
       "        [ 6.        ,  9.        ,  4.        ],\n",
       "        [ 7.        ,  6.        ,  5.        ]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 13
    }
   ],
   "source": [
    "c = tf.concat([x,y],axis=-2)\n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(4, 2, 3), dtype=float32, numpy=\n",
       "array([[[-0.9661166 , -0.04117008, -0.67174935],\n",
       "        [ 0.6423652 ,  0.44960386, -0.8188423 ]],\n",
       "\n",
       "       [[-1.4387952 , -0.12139827, -1.4256965 ],\n",
       "        [ 0.2289934 , -0.4847298 , -0.86219543]],\n",
       "\n",
       "       [[ 7.        ,  6.        ,  6.        ],\n",
       "        [ 4.        ,  8.        ,  4.        ]],\n",
       "\n",
       "       [[ 6.        ,  9.        ,  4.        ],\n",
       "        [ 7.        ,  6.        ,  5.        ]]], dtype=float32)>"
      ]
     },
     "metadata": {},
     "execution_count": 15
    }
   ],
   "source": [
    "d = tf.concat([x,y],axis=-3)\n",
    "d "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "output_type": "error",
     "ename": "InvalidArgumentError",
     "evalue": "ConcatOp : Expected concatenating dimensions in the range [-3, 3), but got 3 [Op:ConcatV2] name: concat",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mInvalidArgumentError\u001b[0m                      Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-17-40e0d0f4ffc0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0md1\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mtf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconcat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0my\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      2\u001b[0m \u001b[0md1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Python3_7_2\\lib\\site-packages\\tensorflow\\python\\util\\dispatch.py\u001b[0m in \u001b[0;36mwrapper\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m    199\u001b[0m     \u001b[1;34m\"\"\"Call target, and fall back on dispatchers if there is a TypeError.\"\"\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    200\u001b[0m     \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 201\u001b[1;33m       \u001b[1;32mreturn\u001b[0m \u001b[0mtarget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    202\u001b[0m     \u001b[1;32mexcept\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mTypeError\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mValueError\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    203\u001b[0m       \u001b[1;31m# Note: convert_to_eager_tensor currently raises a ValueError, not a\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Python3_7_2\\lib\\site-packages\\tensorflow\\python\\ops\\array_ops.py\u001b[0m in \u001b[0;36mconcat\u001b[1;34m(values, axis, name)\u001b[0m\n\u001b[0;32m   1652\u001b[0m           dtype=dtypes.int32).get_shape().assert_has_rank(0)\n\u001b[0;32m   1653\u001b[0m       \u001b[1;32mreturn\u001b[0m \u001b[0midentity\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1654\u001b[1;33m   \u001b[1;32mreturn\u001b[0m \u001b[0mgen_array_ops\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconcat_v2\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1655\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1656\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Python3_7_2\\lib\\site-packages\\tensorflow\\python\\ops\\gen_array_ops.py\u001b[0m in \u001b[0;36mconcat_v2\u001b[1;34m(values, axis, name)\u001b[0m\n\u001b[0;32m   1205\u001b[0m       \u001b[1;32mreturn\u001b[0m \u001b[0m_result\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1206\u001b[0m     \u001b[1;32mexcept\u001b[0m \u001b[0m_core\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_NotOkStatusException\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1207\u001b[1;33m       \u001b[0m_ops\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mraise_from_not_ok_status\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0me\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1208\u001b[0m     \u001b[1;32mexcept\u001b[0m \u001b[0m_core\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_FallbackException\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1209\u001b[0m       \u001b[1;32mpass\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Python3_7_2\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\u001b[0m in \u001b[0;36mraise_from_not_ok_status\u001b[1;34m(e, name)\u001b[0m\n\u001b[0;32m   6841\u001b[0m   \u001b[0mmessage\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0me\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmessage\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;33m(\u001b[0m\u001b[1;34m\" name: \"\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mname\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mname\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m \u001b[1;32melse\u001b[0m \u001b[1;34m\"\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   6842\u001b[0m   \u001b[1;31m# pylint: disable=protected-access\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 6843\u001b[1;33m   \u001b[0msix\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mraise_from\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_status_to_exception\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0me\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcode\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmessage\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   6844\u001b[0m   \u001b[1;31m# pylint: enable=protected-access\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   6845\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Python3_7_2\\lib\\site-packages\\six.py\u001b[0m in \u001b[0;36mraise_from\u001b[1;34m(value, from_value)\u001b[0m\n",
      "\u001b[1;31mInvalidArgumentError\u001b[0m: ConcatOp : Expected concatenating dimensions in the range [-3, 3), but got 3 [Op:ConcatV2] name: concat"
     ]
    }
   ],
   "source": [
    "d1 = tf.concat([x,y],axis=3)\n",
    "d1 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}